package com.example.worldcupsever;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.worldcupsever.bean.ShouListBean;
import com.squareup.picasso.Picasso;

import java.util.List;

public class ShouDetailActivity extends AppCompatActivity {
    private static final String TAG = "ShouDetailActivity";
    ImageView ivShouImage;
    TextView mTvShouName,mTvShouDescription;
    private ShouListBean.ListBean shou;
    List<ShouListBean.ListBean> shouList;
    private Integer userList;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_shou_detail);
        initView();
    }

    private void initView() {
        mTvShouName = findViewById(R.id.tv_shou_name);
        mTvShouDescription = findViewById(R.id.tv_shou_description);
        ivShouImage=findViewById(R.id.iv_shou_image);
        Intent intent=getIntent();
        shou = (ShouListBean.ListBean) intent.getSerializableExtra("shou");
        mTvShouName.setText(shou.getName());
        mTvShouDescription.setText(shou.getDescription());
        Picasso.with(this)
                .load("http://192.168.1.104:8080/WorldCupApp/"+shou.getIcon())
                .resize(400,300)
                .centerCrop()
                .into(ivShouImage);

    }
}
